package prototype;

public class Main {
    public static void main(String[] args) {
        //准备
        Manager manager=new Manager();
        UnderlinePen upen=new UnderlinePen('~');
        MassageBox mbox=new MassageBox('*');
        MassageBox sbox=new MassageBox('/');
        manager.register("strong message",upen);
        manager.register("warning box",mbox);
        manager.register("slash box",sbox);
        //生产
        Product p1=manager.create("strong message");
        p1.use("Hello,world.");
        Product p2=manager.create("warning box");
        p2.use("Hello,world.");
        Product p3=manager.create("slash box");
        p3.use("Hello,world.");
    }
}
